package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CarRentalCompanyMapper;
import com.ruoyi.system.domain.CarRentalCompany;
import com.ruoyi.system.service.ICarRentalCompanyService;

/**
 * 租车公司Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-10
 */
@Service
public class CarRentalCompanyServiceImpl implements ICarRentalCompanyService 
{
    @Autowired
    private CarRentalCompanyMapper carRentalCompanyMapper;

    /**
     * 查询租车公司
     * 
     * @param id 租车公司主键
     * @return 租车公司
     */
    @Override
    public CarRentalCompany selectCarRentalCompanyById(Long id)
    {
        return carRentalCompanyMapper.selectCarRentalCompanyById(id);
    }

    /**
     * 查询租车公司列表
     * 
     * @param carRentalCompany 租车公司
     * @return 租车公司
     */
    @Override
    public List<CarRentalCompany> selectCarRentalCompanyList(CarRentalCompany carRentalCompany)
    {
        return carRentalCompanyMapper.selectCarRentalCompanyList(carRentalCompany);
    }

    /**
     * 新增租车公司
     * 
     * @param carRentalCompany 租车公司
     * @return 结果
     */
    @Override
    public int insertCarRentalCompany(CarRentalCompany carRentalCompany)
    {
        return carRentalCompanyMapper.insertCarRentalCompany(carRentalCompany);
    }

    /**
     * 修改租车公司
     * 
     * @param carRentalCompany 租车公司
     * @return 结果
     */
    @Override
    public int updateCarRentalCompany(CarRentalCompany carRentalCompany)
    {
        return carRentalCompanyMapper.updateCarRentalCompany(carRentalCompany);
    }

    /**
     * 批量删除租车公司
     * 
     * @param ids 需要删除的租车公司主键
     * @return 结果
     */
    @Override
    public int deleteCarRentalCompanyByIds(Long[] ids)
    {
        return carRentalCompanyMapper.deleteCarRentalCompanyByIds(ids);
    }

    /**
     * 删除租车公司信息
     * 
     * @param id 租车公司主键
     * @return 结果
     */
    @Override
    public int deleteCarRentalCompanyById(Long id)
    {
        return carRentalCompanyMapper.deleteCarRentalCompanyById(id);
    }
}
